import Taro from '@tarojs/taro'
import { Navigator, Text, View } from "@tarojs/components";
import './GroupPanel.scss'

interface Interface {
    className?: string;
    url?: string;
    title?: string;
}

class GroupPanel extends Taro.Component<Interface, {}> {

    componentWillMount() {}

    render() {
        const rootCls = `my-panel ${this.props.className}`;
        return (
            <View className={rootCls}>
                <Navigator url={this.props.url} hoverClass='None'>
                    <View className='my-panel-header at-row at-row__align--center'>
                        <View className='at-col'>{this.props.title}</View>
                        <Text className='my-panel-header__arrow at-icon at-icon-chevron-right at-col' />
                    </View>
                </Navigator>
                <View className='my-panel-body'>{this.props.children}</View>
            </View>
        );
    }
}


export default GroupPanel;
